@import './variables.less';

// 全局样式
html {
  font-family: @font-family;
  font-size: @font-size-base;
  color: @text-color;
  line-height: 1.6;
}

body {
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}

// 链接样式
a {
  color: @primary-color;
  text-decoration: none;
  transition: color @transition-duration @transition-timing;

  &:hover {
    color: @secondary-color;
  }
}

// 按钮样式
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: @spacing-sm @spacing-md;
  border-radius: @border-radius-md;
  font-size: @font-size-base;
  font-weight: 500;
  transition: all @transition-duration @transition-timing;
  cursor: pointer;

  &-primary {
    background-color: @primary-color;
    color: white;

    &:hover {
      background-color: @secondary-color;
    }
  }

  &-outline {
    border: 1px solid @border-color;
    background-color: transparent;

    &:hover {
      border-color: @primary-color;
      color: @primary-color;
    }
  }
}

// 卡片样式
.card {
  border: 1px solid rgb(51, 51, 51);
  border-radius: @border-radius-lg;
  padding: @spacing-md;
  // box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  // transition: box-shadow @transition-duration @transition-timing;
  background-color: rgb(12, 12, 12, .1);

  &:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  p {
    color: @text-color;
  }
}

// 标题样式
.title {
  font-size: @font-size-xxl;
  font-weight: bold;
  margin-bottom: @spacing-lg;
  color: @text-color;
}

.subtitle {
  font-size: @font-size-xl;
  font-weight: 600;
  margin-bottom: @spacing-md;
  color: @light-text-color;
}

// 列表样式
.list {
  list-style: none;
  padding: 0;
  margin: 0;

  &-item {
    padding: @spacing-sm 0;
    border-bottom: 1px solid @border-color;

    &:last-child {
      border-bottom: none;
    }
  }
}

// 网格布局
.grid {
  display: grid;
  gap: @spacing-md;

  &-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  &-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  &-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

// 响应式布局
@media (max-width: 768px) {
  .grid {
    &-2, &-3, &-4 {
      grid-template-columns: 1fr;
    }
  }
}

.page-container {
  font-family: Arial, sans-serif;
}

.content {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.sidebar {
  width: 25%;
}

main {
  width: 100%;
  box-sizing: border-box;
}
